package demo.android.com.mvpdemo.mybutterknife;

import android.support.annotation.UiThread;
import android.widget.TextView;

import demo.android.com.mvpdemo.R;

/**
 * Created by Vya on 2018/2/11 0011.
 *  用于找到控件并赋值，这个就是butterknife原理
 */

public class BindingView {
    private TestButterKnifeActivity mActivity;
    @UiThread
    public BindingView(TestButterKnifeActivity activity){
        this.mActivity = activity;
        mActivity.mTextView = (TextView) mActivity.findViewById(R.id.tv_text);
    }

    public void Unbind(){
        mActivity = null;
    }
}
